<!DOCTYPE HTML>
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta charset="utf-8">
<link rel="STYLESHEET" href="../book.css" type="text/css">
<script src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<title>Defining intro themes</title>
</head>
<body>

<h2>Defining Intro Themes</h2>

<p>
A theme defines the overall <em>appearance</em> of the intro. It is simply a way
of grouping all the presentation files (styles and images) in one place that can
be pointed at or switched as one.
</p>

<h3>Definition</h3>

<p>
To define a theme, extend your intro configuration using the
<code>org.eclipse.ui.intro.configExtension</code> and use the <code>theme</code>
element, as shown in the example below:
</p>

<pre>
   &lt;extension
         point="org.eclipse.ui.intro.configExtension"&gt;
      &lt;theme
            default="true"
            id="org.eclipse.ui.intro.universal.circles"
            name="%theme.name.circles"
            path="$nl$/themes/circles"
            previewImage="themes/circles/preview.png"&gt;
         &lt;property
               name="launchbarBackground"
               value="#a1c2cb"/&gt;
         &lt;property
               name="launchbarOverviewIcon"
               value="$theme$graphics/launchbar/overview16.png"/&gt;
         &lt;property
               name="launchbarFirststepsIcon"
               value="$theme$graphics/launchbar/firststeps16.png"/&gt;
         &lt;property
               name="launchbarTutorialsIcon"
               value="$theme$graphics/launchbar/tutorials16.png"/&gt;
         &lt;property
               name="launchbarSamplesIcon"
               value="$theme$graphics/launchbar/samples16.png"/&gt;
         &lt;property
               name="launchbarWhatsnewIcon"
               value="$theme$graphics/launchbar/whatsnew16.png"/&gt;
         &lt;property
               name="launchbarMigrateIcon"
               value="$theme$graphics/launchbar/migrate16.png"/&gt;
         &lt;property
               name="launchbarWebresourcesIcon"
               value="$theme$graphics/launchbar/webresources16.png"/&gt;
      &lt;/theme&gt;
   &lt;/extension&gt;
</pre>

<p>
Consult the <a href="../reference/extension-points/org_eclipse_ui_intro_configExtension.html">schema documentation</a>
for details on all the available attributes relating to themes.
</p>

<p>
Each theme has a unique identifier, translatable name, preview image, and a path
to the root theme folder. The intro plug-in does not provide any UI for theme
manipulation. The only way to select a theme is via the preference
<code>org.eclipse.ui.intro/INTRO_THEME</code> in plugin_customization.ini. 
</p>

<h3>Enabling Themes</h3>

<p>
Theme support by itself does not make intro implementations theme-enabled.
Concrete intro implementations can choose to expose themes in a more substantial
way (and in fact Universal Welcome implementation does exactly that with the

<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.platform.introCustomization)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link">
<b>General &gt; Welcome</b></a>

preference page.
</p>

<p>
Theme-enabled intro implementation must make all the references to style and
presentation resources using the <code>$theme$</code> substitution variable. Absolute paths
for images, pages, styles, etc. will be computed by resolving the substitution
variable using the path of the currently active theme.
</p>

</body>
</html>
